package EA;
import EA.testproblems.*; 

public class RealNumericalFramework extends NumericalFramework
{
  /** This double is used when applying mutation. The entries in the 
      RealNumericalGenome's sigmas array is multiplied with this value and the
      interval length. Example: Let IP be intervalpartition and IL be
      the interval length for variable x_j. Then x_j is mutated by adding
      a random number returned from the normal distribution N(0, sigma_j*IP*IL)
      If IL=7, IP=1/10 and sigma_j=1 then x_j is mutated by N(0, 0.7)<br>
      Default value is 1/10.
  */      
  public double intervalpartition;

  /** Create a new RealNumericalFramework. This used when the framework is 
      just used to access implementation dependent variables.
  */
  public RealNumericalFramework()
    {
      super();
      intervalpartition = 1.0/10;
    }


  /** Create a new RealNumericalFramework. */
  public RealNumericalFramework(Fitness ffunction)
    {
    super(ffunction);
    intervalpartition = 1.0/10;
    }

  /** Create a new RealNumericalFramework. */
  public RealNumericalFramework(int thedimensions, Fitness ffunction)
    {
      super(thedimensions, ffunction);
      intervalpartition = 1.0/10;
    }
  
  public RealNumericalFramework(int thedimensions, Interval[] theintervals, Fitness ffunction)
    {
      super(thedimensions, theintervals, ffunction);
      intervalpartition = 1.0/10;
    }

  
  /** Create a new RealNumericalFramework. This used when the genome is 
      just used to model a number of variables.
  */
  public RealNumericalFramework(int thedimensions, Interval[] theintervals)
    {
      super(thedimensions, theintervals);
      intervalpartition = 1.0/10;
    }

  /** Create a new RealNumericalFramework.
      @param IP Value of the intervalpartition.
  */
  public RealNumericalFramework(int thedimensions, Interval[] theintervals, Fitness ffunction, double IP)
    {
      super(thedimensions, theintervals, ffunction);
      intervalpartition = IP;
    }

  /** Create a new RealNumericalFramework.
      @param IP Value of the intervalpartition.
  */
  public RealNumericalFramework(NumericalProblem numproblem)
    {
      super(numproblem);
      intervalpartition = 1.0/10;
    }

  /** Create a new RealNumericalFramework.
      @param IP Value of the intervalpartition.
  */
  public RealNumericalFramework(NumericalProblem numproblem, double IP)
    {
      super(numproblem);
      intervalpartition = IP;
    }

  /** Set the interval partition. */
  public void setIntervalPartition(double IP)
    {
      intervalpartition = IP;
    }

}
